package com.aistar.hotel.controller;

import com.aistar.hotel.entity.Result;
import com.aistar.hotel.entity.StatusCode;
import com.aistar.hotel.service.HotelCollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by wubin on 2019/7/4.
 */
@RestController
public class HotelCenterController {
    @Autowired
    private HotelCollectService hotelCollectService;

    @GetMapping("/hotelcenter")
    public Result hotelcenter(){
        if (hotelCollectService.findByUid()!=null){
            return new Result(true, StatusCode.OK,"收藏的酒店信息查询成功",hotelCollectService.findByUid());
        }else {
            return new Result(true, StatusCode.ERROR,"收藏的酒店信息查询失败");
        }

    }
}
